package example;

public abstract class  Animal {
    abstract void walk();

}
class Feline extends Animal{
    void walk(){
        System.out.println("Feline walking");
    }
     void climbTree(){}
}



class Main1{
    public static void main(String[] args) {
        Feline f=new Feline();
        Animal a;
        a=f;
        f.climbTree();
        int number[]={1,2,6,4,8,5,6,22,22};
        Animal animal[]={new Feline(),
                new Feline(),
                new Feline()};

        for(int i=0;i<animal.length;i++){
            animal[i].walk();
        }  //foreach

        for (Animal eachAnimal:animal) {
            eachAnimal.walk();
        }

    }
}
